class CreateAssistances < ActiveRecord::Migration
  def self.up
    create_table :assistances do |t|
      t.integer  :client_id, :operator_id, :null => false, :limit => 11
      t.integer  :urgency, :ticket_state, :confirm, :null => false, :limit => 1, :default => 0
      t.integer  :num_ass, :null => false, :limit => 11, :default => 0
      t.datetime :expiration, :execution, :default => nil
      t.time     :duration, :default => "00:00:00"
      t.string   :typology, :limit => 10, :null => true
      t.string   :short_desc, :limit => 255, :null => true
      t.text     :notes
      
      t.datetime :created_at
    end
  end

  def self.down
    drop_table :assistances
  end
end